mod test {
    use std::fs;
    use std::sync::{atomic::{AtomicU32, Ordering}, Arc};
    use tokio::runtime::Builder;
    use rust_my_tools::app;

    fn cre_runtime() -> tokio::runtime::Runtime {
        // 创建一个 Tokio 运行时，配置线程池的大小
        Builder::new_multi_thread()
            //.worker_threads(4) // 设置工作线程的数量
            .max_blocking_threads(16) // 设置阻塞任务的最大线程数
            .enable_all()
            .build()
            .unwrap()
    }

    //测试子文件(夹)统计
    #[test]
    pub fn test_count_sub_file() {
        let runtime = cre_runtime();
        let s = my_util_lib::date::get_chrono_timestamp_millis();
        let counter = Arc::new(AtomicU32::new(0_u32));
     

        let mut path_vec = runtime.block_on(async {
            app::init_log().await.unwrap();
            my_util_lib::tokio_file::count_sub_file(r"d:\".into(), counter.clone()).await.unwrap()
        });
        let e = my_util_lib::date::get_chrono_timestamp_millis();
        let current_value = counter.load(Ordering::SeqCst);
        println!("数量:{}, 耗时：{}ms, size:{}", current_value, (e-s), path_vec.len());
      
        for path in path_vec{
            // println!("{}", path);
        }
    }


}